using System;
using System.ComponentModel.DataAnnotations;
using MESBaseis.Domain.BaseEntities;

namespace MESBaseis.Domain.XZY
{
    /// <summary>
    /// 用户通知接收实体
    /// </summary>
    public class UserNotificationModel : BaseModel
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Required]
        public int UserId { get; set; }

        /// <summary>
        /// 公告ID
        /// </summary>
        [Required]
        public int AnnouncementId { get; set; }

        /// <summary>
        /// 是否已读
        /// </summary>
        public bool IsRead { get; set; } = false;

        /// <summary>
        /// 接收时间
        /// </summary>
        public DateTime ReceivedAt { get; set; } = DateTime.Now;

        /// <summary>
        /// 阅读时间
        /// </summary>
        public DateTime? ReadAt { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Remarks { get; set; }
    }
}